<template>
  <view class="wrap">
    <div class="flex flex-col">
      <m-card bodyAuto>
        <u-swiper :list="list1" @change="change" @click="click"></u-swiper>
      </m-card>
      <u-tabs :list="tabsList" @click="click" :current="2"></u-tabs>
      <!-- <u-tabs :list="tabsList" :is-scroll="false" :current="current" @change="changeTab"></u-tabs> -->
    </div>

    <m-tab-bar></m-tab-bar>
  </view>
</template>

<script>
  import {
    mapState,
    mapMutations
  } from 'vuex'
  import {
    univerifyLogin
  } from '@/common/univerify.js'

  export default {
    data() {
      return {
        list1: [
          'https://cdn.uviewui.com/uview/swiper/swiper1.png',
          'https://cdn.uviewui.com/uview/swiper/swiper2.png',
          'https://cdn.uviewui.com/uview/swiper/swiper3.png',
        ],
        current:1,
        tabsList: [{
          name: '关注1',
        }, {
          name: '推荐',
        }, {
          name: '电影'
        }, {
          name: '科技'
        }]
      }
    },
    computed: mapState(['forcedLogin', 'hasLogin', 'userName', 'eventId']),
    onLoad() {

    },
    methods: {
      ...mapMutations(['login']),
      toUserLogin() {
        uni.reLaunch({
          url: '../login/login',
        });
      },
      change(){

      },
      changeTab(index){
        this.current = index;
      },
      click(){
        console.log('click')
      }
    }

  }
</script>

<style>

</style>
